<template>
    <div>
     这是son组件
    </div>
    <p>这是父亲给的钱{{modelValue}}</p>
    <p>这是父亲给的房{{house}}</p>
    <button @click="$emit('update:modelValue',modelValue-20)">花钱</button>
    <button @click="$emit('update:house','茅草屋')">一键换房</button>
</template>

<script setup lang="ts">
defineProps<{
modelValue:number
house:string
}>()
defineEmits<{
(e:'update:modelValue',money:number):void
(e:'update:house',house:string):void
}>()
</script>

<style scoped>

</style>